Skip to content

Commit

Permalink
Merge pull request #1 from MinaFoundation/update-queries-to-comply-wi…
Browse files Browse the repository at this point in the history
…th-pm-1592

PM-1592 update queries files_processed condition
  • Loading branch information
piotr-iohk authored May 8, 2024
2 parents d47f477 + 9ddc394 commit 1e0e5ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions submission_report/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def submissions_per_batch(self, submitter, start_date, end_date):
AND s.submitter = %s
AND s.submitted_at_date BETWEEN %s AND %s
WHERE
b.files_processed > 0
b.files_processed > -1
AND (to_timestamp(b.batch_start_epoch) AT TIME ZONE 'UTC')::date >= %s
AND (to_timestamp(b.batch_end_epoch) AT TIME ZONE 'UTC')::date <= %s
GROUP BY
Expand Down Expand Up @@ -108,7 +108,7 @@ def points_per_batch(self, submitter, start_date, end_date):
LEFT JOIN
nodes n ON ps.node_id = n.id
WHERE
b.files_processed > 0
b.files_processed > -1
AND (to_timestamp(b.batch_start_epoch) AT TIME ZONE 'UTC')::date >= %s
AND (to_timestamp(b.batch_end_epoch) AT TIME ZONE 'UTC')::date <= %s
GROUP BY
Expand Down Expand Up @@ -140,7 +140,7 @@ def batches_without_points(self, submitter, start_date, end_date):
b.id = ps.bot_log_id
WHERE
ps.bot_log_id IS NULL
AND b.files_processed > 0
AND b.files_processed > -1
AND (to_timestamp(b.batch_start_epoch) AT TIME ZONE 'UTC')::date >= %s
AND (to_timestamp(b.batch_end_epoch) AT TIME ZONE 'UTC')::date <= %s
ORDER BY
Expand Down

0 comments on commit 1e0e5ab

Please sign in to comment.