Skip to content

Fix logging getJPX statistics#497

Open
dgarciabriseno wants to merge 3 commits into
Helioviewer-Project:mainfrom
dgarciabriseno:jpx-statistics
Open

Fix logging getJPX statistics#497
dgarciabriseno wants to merge 3 commits into
Helioviewer-Project:mainfrom
dgarciabriseno:jpx-statistics

Conversation

@dgarciabriseno

Copy link
Copy Markdown
Contributor

Issue is caused by strict mode enabled in MySQL.
Setting timestamp = NULL caused an error, instead of just using the default CURRENT_TIMESTAMP.
By leaving out timestamp and id altogether, the query succeeds.

Comment thread src/Database/Statistics.php Outdated
$key = HV_REDIS_STATS_PREFIX . "/" . $dateTimeNearestHour . "/" . $action . "/" . $this->_GetDevice();
$redis->incr($key);
}catch(Exception $e){
//continue gracefully if redis statistics logging fails

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repoty here as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants