Skip to content

Commit 5c45163

Browse files
committed
Merge pull request #110 from FlorianPerucki/master
Fixed OverflowError when returning job IDs
2 parents 3866ad3 + c75b99a commit 5c45163

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

mrq/bin/mrq_run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
import sys
1515
import argparse
1616
import ujson as json
17+
import json as json_stdlib
1718
import datetime
1819

1920
sys.path.insert(0, os.getcwd())
2021

2122
from mrq import config, utils
2223
from mrq.context import set_current_config, set_current_job, connections
2324
from mrq.job import queue_job
24-
from mrq.utils import load_class_by_path
25-
25+
from mrq.utils import load_class_by_path, MongoJSONEncoder
2626

2727
def main():
2828

@@ -58,7 +58,7 @@ def main():
5858
job.datestarted = datetime.datetime.utcnow()
5959
set_current_job(job)
6060
ret = job.perform()
61-
print json.dumps(ret) # pylint: disable=no-member
61+
print json_stdlib.dumps(ret, cls=MongoJSONEncoder) # pylint: disable=no-member
6262

6363
# This shouldn't be needed as the process will exit and close any remaining sockets
6464
# connections.redis.connection_pool.disconnect()

0 commit comments

Comments
 (0)