Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I already fix two bug of you project and make its better on deploy #90

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions SpiderKeeper/app/spider/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ def project_create():
project.project_name = project_name
db.session.add(project)
db.session.commit()
session['project_id'] = project.id
return redirect("/project/%s/spider/deploy" % project.id, code=302)


Expand Down Expand Up @@ -649,6 +650,8 @@ def spider_egg_upload(project_id):
file.save(dst)
agent.deploy(project, dst)
flash('deploy success!')
from SpiderKeeper.app.schedulers.common import sync_spiders
sync_spiders()
return redirect(request.referrer)


Expand Down
2 changes: 1 addition & 1 deletion SpiderKeeper/app/templates/job_dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h3 class="box-title">Running Jobs</h3>
{% if job.job_instance %}
<tr>
<td>{{ job.job_execution_id }}</td>
<td><a href="/project/1/job/periodic#{{ job.job_instance_id }}">{{ job.job_instance_id }}</a></td>
<td><a href="/project/{{ project.id }}/job/periodic#{{ job.job_instance_id }}">{{ job.job_instance_id }}</a></td>
<td>{{ job.job_instance.spider_name }}</td>
<td class="txt-args" data-toggle="tooltip" data-placement="right"
title="{{ job.job_instance.spider_arguments }}">{{ job.job_instance.spider_arguments }}
Expand Down