File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414import sys
1515import argparse
1616import ujson as json
17+ import json as json_stdlib
1718import datetime
1819
1920sys .path .insert (0 , os .getcwd ())
2021
2122from mrq import config , utils
2223from mrq .context import set_current_config , set_current_job , connections
2324from 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
2727def 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()
You can’t perform that action at this time.
0 commit comments