Comments (7)
I think this was the purpose of having the shub shell
, to use shub commands in a session.
I haven't heard about the shub shell
recently, though.
from shub.
I'm not convinced yet about adding the amount of state we keep track of. We could instead support shortcuts like prod/2
for referring to the last job of that spider.
In any case, I would consider #91 and #83 higher priority.
from shub.
It's just that the items
line is the only ugly one in this workflow:
shub deploy
shub schedule myspider
shub items 2/18
Just realized that hubstorage keeps track of which jobs were ran last:
hsc = HubstorageClient()
project = hsc.get_project('12345')
latest_job = next(project.jobq.list(count=1))
There's no guarantee that the last job is indeed the last one scheduled via shub
, but it might still be a good default job. E.g. I can check whether the last scheduled run in a project went smoothly with shub log
without having to look up a job ID.
from shub.
How about saving it to the environment? That way it would be local to the terminal session the spider was scheduled from.
from shub.
The feature request is old but still actual, and I suppose we could simplify it like Jakob proposed: store the last scheduled job id in an environment variable, and if job id is omitted in shub logs/items/requests
, check the env variable.
from shub.
I actually realized later that that cannot work. 😅 A subprocess (shub
) only receives a copy of its parent's (the shell) environment, so any changes we make to the environment will be lost once shub
exits.
from shub.
@jdemaeyer a good point, thanks for sharing! I'll keep it open for a while though, as the idea seems pretty useful as a whole.
from shub.
Related Issues (20)
- Allow dots in args names
- Incorrect API Key generation URL HOT 3
- shub image upload with arg --apikey doesn't work
- Output of `pwd_git_version` produces invalid Docker tag name
- relax click dependency to make it possible to satisfy other project dependencies
- relax click dependency to make it possible to satisfy other project dependencies HOT 2
- drop support for Python 2.7, 3.5, 3.6
- Configure the latest Scrapy stack by default
- Add support for Python 3.10 HOT 2
- pipenv.utils.convert_deps_to_pip removed HOT 3
- Desktop notification after the deploy finishes HOT 3
- Project-specific requirements
- Python wheels support HOT 3
- Every invocation of `shub` prints `UserWarning: Setuptools is replacing distutils.` HOT 1
- Using deps from `install_requires` if `requirements.txt` is not declared
- Executing commands on scrapinghub cloud HOT 2
- link to app.zyte.com instead of app.scrapinghub.com HOT 2
- AttributeError: 'PathDistribution' object has no attribute 'name' HOT 6
- Detected error connecting to Docker daemon's host. (minimum version of 1.24 needed)
- Report endpoint misconfiguration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shub.