Closed onede-ku closed 3 years ago
我们是6点到18点打卡,测试的时候不在当前时间段这个怎么整
---原始邮件--- 发件人: @.> 发送时间: 2021年8月9日(周一) 中午12:32 收件人: @.>; 抄送: @.>;"State @.>; 主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 请问打卡时间段怎么改 (#7)
如果你只想打下午的卡,那么把定时设置改成在下午启动即可。
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
我们是6点到18点打卡,测试的时候不在当前时间段这个怎么整 … ---原始邮件--- 发件人: @.> 发送时间: 2021年8月9日(周一) 中午12:32 收件人: @.>; 抄送: @.>;"State @.>; 主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 请问打卡时间段怎么改 (#7) 如果你只想打下午的卡,那么把定时设置改成在下午启动即可。 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
你们一天打卡多少次?分别是在什么时间段?
你可以在 PunchIn
函数的 res = json.loads(response.text)
这一行下面新增一行 print(123,res)
,看看打印的是什么数据,这边时段是根据后端返回数据来判断的,如果测试时的时间确实是在你们学校的打卡时段内,不应该会提示“不在打卡时段内”的。
我们只打卡一次,加上那个代码输出是这样的 [INFO]begin deploy function [INFO]/usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/src [INFO]zip finished ,start upload to cos [INFO]upload cos taskID e970ee72-6cb9-6683-b041-1e4f6b9a5f63 [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [0 B/5.77 KB] [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [5.77 KB/5.77 KB] [INFO][cos] request SliceUploadFile using time 399ms
Invoke function helloworld-1628493547 [RequestId:58173551-e28e-454f-97f0-959f363c3c5c] Response: null Output: START RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Event RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Starting new HTTPS connection (1): student.wozaixiaoyuan.com:443 https://student.wozaixiaoyuan.com:443 "POST /heat/getTodayHeatList.json HTTP/1.1" 200 20 不在打卡时间段内 Starting new HTTP connection (1): www.pushplus.plus:80 http://www.pushplus.plus:80 "POST /send HTTP/1.1" 200 None
END RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Report RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Duration:296ms Memory:128MB MemUsage:16.668MB Summary: Request ID: 58173551-e28e-454f-97f0-959f363c3c5c Run Duration: 296 Bill Duration: 296 Usage Memory: 16.66796875 Invoke Result: 0
---原始邮件--- 发件人: @.> 发送时间: 2021年8月9日(周一) 下午3:07 收件人: @.>; 抄送: @.>;"State @.>; 主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 请问打卡时间段怎么改 (#7)
我们是6点到18点打卡,测试的时候不在当前时间段这个怎么整 … ---原始邮件--- 发件人: @.> 发送时间: 2021年8月9日(周一) 中午12:32 收件人: @.>; 抄送: @.>;"State @.>; 主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 请问打卡时间段怎么改 (#7) 如果你只想打下午的卡,那么把定时设置改成在下午启动即可。 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
你们一天打卡多少次,分别是在什么时间段?
你可以在 PunchIn 函数的 res = json.loads(response.text) 这一行下面新增一行 print(123,res),看看打印的是什么数据,这边时段是根据后端返回数据来判断的,如果确实是在你们学校的打卡时段内,不应该会提示“不在打卡时段内”的。
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
我们只打卡一次,加上那个代码输出是这样的 [INFO]begin deploy function [INFO]/usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/src [INFO]zip finished ,start upload to cos [INFO]upload cos taskID e970ee72-6cb9-6683-b041-1e4f6b9a5f63 [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [0 B/5.77 KB] [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [5.77 KB/5.77 KB] [INFO][cos] request SliceUploadFile using time 399ms Invoke function helloworld-1628493547 [RequestId:58173551-e28e-454f-97f0-959f363c3c5c] Response: null Output: START RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Event RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Starting new HTTPS connection (1): student.wozaixiaoyuan.com:443 https://student.wozaixiaoyuan.com:443 "POST /heat/getTodayHeatList.json HTTP/1.1" 200 20 不在打卡时间段内 Starting new HTTP connection (1): www.pushplus.plus:80 http://www.pushplus.plus:80 "POST /send HTTP/1.1" 200 None END RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Report RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Duration:296ms Memory:128MB MemUsage:16.668MB Summary: Request ID: 58173551-e28e-454f-97f0-959f363c3c5c Run Duration: 296 Bill Duration: 296 Usage Memory: 16.66796875 Invoke Result: 0 … ---原始邮件--- 发件人: @.> 发送时间: 2021年8月9日(周一) 下午3:07 收件人: @.>; 抄送: @.>;"State @.>; 主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 请问打卡时间段怎么改 (#7) 我们是6点到18点打卡,测试的时候不在当前时间段这个怎么整 … ---原始邮件--- 发件人: @.> 发送时间: 2021年8月9日(周一) 中午12:32 收件人: @.>; 抄送: @.>;"State @.>; 主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 请问打卡时间段怎么改 (#7) 如果你只想打下午的卡,那么把定时设置改成在下午启动即可。 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. 你们一天打卡多少次,分别是在什么时间段? 你可以在 PunchIn 函数的 res = json.loads(response.text) 这一行下面新增一行 print(123,res),看看打印的是什么数据,这边时段是根据后端返回数据来判断的,如果确实是在你们学校的打卡时段内,不应该会提示“不在打卡时段内”的。 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
你没修改对地方吧,这些信息里没看到 print
语句打印出来的。
这样改吧,在 res = json.loads(response.text)
语句下面增加这三行:
print('++++++++++++++++++++++++++++++++++++++++++++++')
print(res)
print('++++++++++++++++++++++++++++++++++++++++++++++')
确认语句加在正确的地方,然后保存、部署、测试,然后查看控制台找找类似下图这样的语句:
截图发一下
上次应该是加错地方了,这次应该可以了,还有一个问题是函数调用中的参数温度没有值,不知道有没有影响,我们没有这一项应该 [INFO]begin deploy function [INFO]/usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/src [INFO]zip finished ,start upload to cos [INFO]upload cos taskID 96f8c35d-4fad-efa2-8d0c-9f6edb5310c4 [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [0 B/5.77 KB] [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [5.77 KB/5.77 KB] [INFO][cos] request SliceUploadFile using time 750ms
Invoke function helloworld-1628493547 [RequestId:73e3f369-531f-49cc-b2da-d4e803f2da51] Response: null Output: START RequestId: 73e3f369-531f-49cc-b2da-d4e803f2da51 Event RequestId: 73e3f369-531f-49cc-b2da-d4e803f2da51 Starting new HTTPS connection (1): student.wozaixiaoyuan.com:443 https://student.wozaixiaoyuan.com:443 "POST /heat/getTodayHeatList.json HTTP/1.1" 200 20 不在打卡时间段内 Starting new HTTP connection (1): www.pushplus.plus:80 http://www.pushplus.plus:80 "POST /send HTTP/1.1" 200 None
END RequestId: 73e3f369-531f-49cc-b2da-d4e803f2da51 Report RequestId: 73e3f369-531f-49cc-b2da-d4e803f2da51 Duration:556ms Memory:128MB MemUsage:48.6836MB Summary: Request ID: 73e3f369-531f-49cc-b2da-d4e803f2da51 Run Duration: 556 Bill Duration: 556 Usage Memory: 48.68359375 Invoke Result: 0 [INFO]begin deploy function [INFO]/usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/src [INFO]zip finished ,start upload to cos [INFO]upload cos taskID af3c6a69-0d50-6030-401c-bed73652725f [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [0 B/5.77 KB] [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [5.77 KB/5.77 KB] [INFO][cos] request SliceUploadFile using time 379ms
Invoke function helloworld-1628493547 [RequestId:684b0883-f149-4cb6-a94f-f2df0660731e] Response
---原始邮件--- 发件人: @.> 发送时间: 2021年8月9日(周一) 晚上6:08 收件人: @.>; 抄送: @.>;"State @.>; 主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 请问打卡时间段怎么改 (#7)
我们只打卡一次,加上那个代码输出是这样的 [INFO]begin deploy function [INFO]/usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/src [INFO]zip finished ,start upload to cos [INFO]upload cos taskID e970ee72-6cb9-6683-b041-1e4f6b9a5f63 [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [0 B/5.77 KB] [INFO]uploading /usr/local/var/functions/ap-guangzhou/lam-6cnmao4o/helloworld-1628493547/.scf_tmp/default-helloworld-1628493547-latest.zip [5.77 KB/5.77 KB] [INFO][cos] request SliceUploadFile using time 399ms Invoke function helloworld-1628493547 [RequestId:58173551-e28e-454f-97f0-959f363c3c5c] Response: null Output: START RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Event RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Starting new HTTPS connection (1): student.wozaixiaoyuan.com:443 https://student.wozaixiaoyuan.com:443 "POST /heat/getTodayHeatList.json HTTP/1.1" 200 20 不在打卡时间段内 Starting new HTTP connection (1): www.pushplus.plus:80 http://www.pushplus.plus:80 "POST /send HTTP/1.1" 200 None END RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Report RequestId: 58173551-e28e-454f-97f0-959f363c3c5c Duration:296ms Memory:128MB MemUsage:16.668MB Summary: Request ID: 58173551-e28e-454f-97f0-959f363c3c5c Run Duration: 296 Bill Duration: 296 Usage Memory: 16.66796875 Invoke Result: 0 … ---原始邮件--- 发件人: @.> 发送时间: 2021年8月9日(周一) 下午3:07 收件人: @.>; 抄送: @.>;"State @.>; 主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 请问打卡时间段怎么改 (#7) 我们是6点到18点打卡,测试的时候不在当前时间段这个怎么整 … ---原始邮件--- 发件人: @.> 发送时间: 2021年8月9日(周一) 中午12:32 收件人: @.>; 抄送: @.>;"State @.>; 主题: Re: [zimin9/WoZaiXiaoYuanPuncher] 请问打卡时间段怎么改 (#7) 如果你只想打下午的卡,那么把定时设置改成在下午启动即可。 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. 你们一天打卡多少次,分别是在什么时间段? 你可以在 PunchIn 函数的 res = json.loads(response.text) 这一行下面新增一行 print(123,res),看看打印的是什么数据,这边时段是根据后端返回数据来判断的,如果确实是在你们学校的打卡时段内,不应该会提示“不在打卡时段内”的。 — You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
你没修改对地方吧,这些信息里没看到 print 语句打印出来的。确认语句加在正确的地方,然后保存、部署、测试,查看控制台中类似 123 {.........} 这样的语句,截图看看
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
@onede-ku 你注意看我回复的内容,你的控制台信息里还是没有语句打印出来的内容,所以我没办法分析。温度参数的问题,你把 utils.py
里面的 def getRandomTemprature(self,temperature)
改成 def getRandomTemprature(temperature)
就好了
如果你只想打下午的卡,那么把定时设置改成在下午启动即可。