rq / rq-scheduler

A lightweight library that adds job scheduling capabilities to RQ (Redis Queue)
MIT License
1.45k stars 230 forks source link

Error while running rq-scheduler #202

Open sarjodas opened 5 years ago

sarjodas commented 5 years ago
service_urls = []
for service_url in service_urls:
    q.schedule(
        scheduled_time=datetime.utcnow(),
        func=check_single_service,
        args=(service_url, ),
        kwargs={},
        interval=5,
        repeat=None
    )
q.run()

When I try to run the above code snippet, I get an error "connection.hmset(key, self.to_dict(include_meta=include_meta)) AttributeError: 'str' object has no attribute 'hmset'"

Can someone please tell me how can I get rid if this error?

adamrt commented 5 years ago

Looks like your connection variable is a string instead of an actual connection instance. Not sure if thats further up in your code or in the check_single_service function though.