Skip to content

Commit

Permalink
update right code
Browse files Browse the repository at this point in the history
  • Loading branch information
Seriainme committed Jun 26, 2024
1 parent 5a61d2d commit 4046f49
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ requests = "==2.31.0"
loguru = "==0.7.2"
pymongo = "==4.6.1"
arrow = "*"
python-dotenv = "*"

[dev-packages]

Expand Down
15 changes: 12 additions & 3 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion spider.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
from loguru import logger
import inspect,pymongo
import arrow
from dotenv import load_dotenv

load_dotenv()

class MongoHandler(logging.Handler):
# 单例模式,确保每次实例化都调用一个对象。
Expand Down Expand Up @@ -61,4 +63,4 @@ def __call__(self, *args, **kwargs):

# Print the message with today's date
print(f'fxx my job {today} test now for harbor ')
print(os.envget("MONGO_PORT"))
print(os.environ.get("MONGO_PORT"))

0 comments on commit 4046f49

Please sign in to comment.