Time |
Nick |
Message |
02:49 |
|
beanjammin joined #evergreen |
06:31 |
pinesol_green |
News from qatests: Testing Success <http://testing.evergreen-ils.org/~live> |
07:14 |
|
rjackson_isl joined #evergreen |
08:37 |
|
jaswinder joined #evergreen |
08:39 |
jaswinder |
Hey Guys, I am running into an issue where I do not get a response back from an Open-ILS service. I am calling from custom search that sits inside the WWW folder. After the request is processed, I am calling $req->gather(1). I am not sure what is the purpose of $req->gather method? |
08:45 |
|
mmorgan joined #evergreen |
08:54 |
|
Dyrcona joined #evergreen |
09:00 |
|
bos20k joined #evergreen |
09:13 |
|
kmlussier joined #evergreen |
09:14 |
|
felicia_home joined #evergreen |
09:18 |
remingtron |
jaswinder: Here's an explanation from the article "Easing Gently Into OpenSRF": |
09:18 |
remingtron |
jaswinder: "The gather() method, called on the result object returned by the request() method, iterates over all of the possible results from the result object and returns a single variable." |
09:18 |
remingtron |
The article can be found here: http://library.calvin.edu/devdocs_project/doku.php?id=easing_gently_into_opensrf |
09:20 |
jaswinder |
THanks remingtron. I switched over $req->recv->content call. Is that different than gather call? |
09:21 |
remingtron |
jaswinder: yes, I believe they are different, but I'm not very familiar with OpenSRF at that level. |
09:22 |
jaswinder |
okay |
09:22 |
jaswinder |
Is the gather method returns hash reference? |
09:23 |
remingtron |
jaswinder: I think the gather() function takes the content and checks whether OpenSRF split it into separate messages.. |
09:23 |
jaswinder |
okay |
09:24 |
remingtron |
jaswinder: from the "Easing Gently" article, it sounds like gather() will return whatever the API sent, after piecing it back together if necessary. |
09:26 |
jaswinder |
The weired part is that I have tested my API with a test code and that worked. When calling the same code from WWW location, it breaks and complains that data is not a Hash reference |
09:26 |
jaswinder |
Do I have to convert into hash reference? |
09:29 |
jaswinder |
Actually, I got it to work. I missed an @ symbol |
09:29 |
jaswinder |
One question, is there a way to run the code in WWW without restarting the servers? |
09:30 |
Dyrcona |
jaswinder: gather() takes all of the results and bundles them up into an array reference. |
09:31 |
Dyrcona |
recv gets results one at a time and is typically done in a loop: while ($result = $request->recv) { $content = $result->content; # Do something with content } |
09:32 |
|
collum joined #evergreen |
09:33 |
Dyrcona |
You can also check status of the result, etc., in your code with recv. With gather, things are a little different. |
09:38 |
remingtron |
Dyrcona: thanks for clearing things up! |
09:38 |
remingtron |
Dyrcona++ |
09:39 |
|
jwoodard joined #evergreen |
09:40 |
|
dwgreen joined #evergreen |
09:44 |
jaswinder |
Thanks Dyrcona |
09:44 |
jaswinder |
is there a way to run the code in WWW without restarting the servers? |
09:46 |
Dyrcona |
jaswinder: Do you mean without restarting Apache? You could always do an Apache reload. |
09:48 |
Dyrcona |
If I am not mistaken, I think changes to the perl modules under /path/to/perllib/OpenILS/WWW do not require a restart. I think Apache sees that they've changed and reads them in again if necessary, or maybe they get picked when new child processes are spawned. |
09:48 |
Dyrcona |
It's been a while since I've tested that. |
09:54 |
|
ejk joined #evergreen |
09:57 |
|
yboston joined #evergreen |
09:57 |
berick |
apache reload is needed for OpenILS/WWW |
09:57 |
berick |
(or restart) |
09:59 |
berick |
though i don't know if newly spawned children pick up the changes over time. |
10:00 |
jaswinder |
Dyrcona: To see immediate changes, I do have to restart the apache even if it is a one line change. This process slows down the whole dev process |
10:01 |
berick |
jaswinder: reload also works and is quicker |
10:01 |
jaswinder |
The new process may hold new code, but not if you want to see an immediate change. |
10:01 |
jaswinder |
berick: it is quicker if you have to run it few times not every code change |
10:02 |
berick |
i just mean 'reload' is quicker than 'restart' |
10:04 |
dbwells |
I think there are common misconceptions about what 'gather' does, and part of that I think comes from the name. AFAIK, it doesn't actually do anything to bundle responses. It calls a wait stage, handles some error checking, and (if passed a true value) will handily declare a request finished. It is often used with 'atomic' requests (which does the bundling), but as long as you don't finish, you could in theory use gather to loop over the respons |
10:04 |
dbwells |
es just like recv. (Though it makes less sense with the added wait stage, I think.) |
10:04 |
* dbwells |
ducks out |
10:06 |
Dyrcona |
jaswinder: I usually work in a manner that I don't restart frequently. I make my changes on my laptop, push them to a git branch, pull the branch on the vm/server, then install them. |
10:06 |
Dyrcona |
dbwells++ |
10:07 |
|
Christineb joined #evergreen |
10:08 |
jaswinder |
Dyrcona: You have more steps to do than me |
10:08 |
Dyrcona |
Maybe, but it's less error prone and it works for me. |
10:09 |
Dyrcona |
I don't like editing files in place on the server. I find things get messed up rather quickly that way. |
10:11 |
|
eby joined #evergreen |
10:12 |
|
sard joined #evergreen |
10:14 |
jaswinder |
Dyrcona: I agree. I have local VM setup with EG running along with Git. So, it is pretty easy for dev purposes |
10:29 |
|
beanjammin joined #evergreen |
10:47 |
pinesol_green |
[evergreen|Remington Steed] Docs: Update "Acquisitions Admin" for web client - <http://git.evergreen-ils.org/?p=Evergreen.git;a=commit;h=8ca036b> |
11:04 |
rjackson_isl |
Bmagic++ times a bunch! |
11:21 |
csharp |
b5d32378 |
11:21 |
pinesol_green |
csharp: [evergreen|Bill Erickson] LP#1350042 Browser client templates/scripts (phase 1) - <http://git.evergreen-ils.org/?p=Evergreen.git;a=commit;h=b5d3237> |
11:21 |
csharp |
wow - megacommit |
11:23 |
bshum |
That's a throwback for sure :) |
11:24 |
bshum |
I was starting to worry like, wait, I don't remember committing that today?! Oh wait... 2014... okay :) |
11:29 |
|
stephengwills joined #evergreen |
11:30 |
csharp |
@who is so 2014? |
11:30 |
pinesol_green |
akilsdonk is so 2014. |
11:31 |
csharp |
bshum: will we see you in St. Charles? |
11:32 |
* csharp |
tried for Meet Me in St. Louis pun but gave up |
11:32 |
bshum |
csharp: I listened to that song the other night, "Meet me in St. Louis, Louis" |
11:33 |
bshum |
It was catchy |
11:33 |
csharp |
:-) |
11:33 |
bshum |
Yes, I will be there! |
11:33 |
csharp |
bshum: awesome! |
11:33 |
Bmagic |
csharp is a spy |
11:33 |
bshum |
I'm trying to decide if I'm going to rent a car and go sightseeing more while I'm down that way |
11:34 |
* csharp |
straightens trenchcoat label and fedora |
11:34 |
csharp |
er.. lapel |
11:34 |
csharp |
bshum: Bmagic says Columbia is where we *should* be having the conference if airports weren't so far away |
11:35 |
Bmagic |
Columbia > St. Louis :) |
11:35 |
Bmagic |
But St. Louis DOES have a Cheesecake Factory, so it's not all bad |
11:36 |
csharp |
@dessert Bmagic |
11:36 |
* pinesol_green |
grabs some Walker's Pure Butter Shortbread for Bmagic |
11:36 |
Bmagic |
I am hoping to get some folks to Columbia, perhaps Hack-a-way 2019 or beyond |
11:38 |
csharp |
Bmagic++ |
11:40 |
Bmagic |
it question |
11:40 |
Bmagic |
git question |
11:40 |
* kmlussier |
will be returning to St. Louis again in July. |
11:41 |
Bmagic |
I have a branch tracking origin/master - and master gets updated, and I git pull, now the commits from master are all over the top of my stuff. I want my stuff to be on the top so that when i commit, it looks nice |
11:41 |
kmlussier |
I usually do git fetch --all and then git rebase |
11:42 |
kmlussier |
Rebase will put your stuff on top. |
11:42 |
rhamby |
I need to put out a notice but folks interested in the 2019 Hack-A-Way should be thinking about their proposals now. |
11:42 |
Dyrcona |
BMagic: Either what kmlussier said or git pull --rebase |
11:42 |
Bmagic |
git pull was incorrect then? I suppose I can get reset --soft HEAD~65 |
11:42 |
kmlussier |
Dyrcona: I didn't know you could do that! Cool! |
11:43 |
Dyrcona |
Just git pull will merge, which mixes the commits up. |
11:43 |
Dyrcona |
git pull was not incorrect if that's what you wanted to do. :) |
11:43 |
Dyrcona |
git pull --rebase is relatively new, I think. |
11:44 |
Dyrcona |
Another tip while I'm thinking of it. |
11:45 |
Dyrcona |
Before working on a branch that I've not touched in a while, I usually do: |
11:45 |
Dyrcona |
git fetch --all |
11:45 |
Dyrcona |
git rebase remote/basebranch local/branch |
11:45 |
|
jvwoolf joined #evergreen |
11:46 |
Dyrcona |
That will checkout local/branch and rebase it on the remote/basebranch. |
11:47 |
mmorgan |
Dyrcona++ |
11:47 |
Bmagic |
Yall are awesome |
11:48 |
bshum |
For the curious: https://coderwall.com/p/yf5-0w/like-git-pull-rebase-make-it-default |
11:48 |
|
khuckins joined #evergreen |
11:56 |
|
ngf42 joined #evergreen |
12:03 |
* berick |
needs a git one-liner that squashes the tip commit into the previous commit using the commit message from the previous commit. |
12:04 |
berick |
the quickly-fix-a-typo work flow |
12:04 |
|
yboston joined #evergreen |
12:07 |
|
beanjammin joined #evergreen |
12:10 |
pinesol_green |
[evergreen|Jane Sandberg] Docs: updating marc_export options documentation - <http://git.evergreen-ils.org/?p=Evergreen.git;a=commit;h=d05f212> |
12:17 |
|
jvwoolf1 joined #evergreen |
12:18 |
Dyrcona |
berick that can be done rather easily. |
12:19 |
Dyrcona |
Excpet, you will have to edit the rebase options, but if you can set your editor to ed for the duration of the command, it should be able to do it automatically for you. |
12:30 |
|
jihpringle joined #evergreen |
12:41 |
Dyrcona |
berick: Two lines of shell code: https://pastebin.com/Y80S8SHf |
12:43 |
Dyrcona |
FYI: You'll need to edit the sed line if used on BSD. |
12:43 |
berick |
Dyrcona++ # neat, i'll try it out |
12:46 |
berick |
it worked, very cool |
12:46 |
berick |
thanks Dyrcona |
12:46 |
Dyrcona |
YW, and I could use something like that myself, so.... |
12:50 |
berick |
and for the final form (for me) adding the initial commit: |
12:51 |
berick |
alias gcs='git commit -asm "x";GIT_EDITOR="sed -e 2s/^pick/fixup/ -i " git rebase -i HEAD^^' |
12:52 |
Dyrcona |
OK. Saves the commit step that way. |
12:54 |
Dyrcona |
berick++ |
13:44 |
Bmagic |
berick++ # very cool |
13:47 |
jeff |
"gcs", and not "arg"? :-) |
14:12 |
pinesol_green |
[evergreen|Remington Steed] Docs: Update "Ordering materials" for web client - <http://git.evergreen-ils.org/?p=Evergreen.git;a=commit;h=0e80495> |
14:22 |
|
b_bonner joined #evergreen |
15:04 |
Dyrcona |
Are there any examples of changing a web staff client button label from Angular that I could crib? |
15:04 |
Dyrcona |
I want to change a button label based on an option. |
15:06 |
|
kdt8 joined #evergreen |
15:08 |
Dyrcona |
I could sidestep the issue by changing the label to "Print List" instead of "Print Full List." |
15:08 |
|
nfpl joined #evergreen |
15:08 |
berick |
or have 2 buttons, optionally visible |
15:08 |
Dyrcona |
I'll put that in a separate commit so it is easy to remove if anyone objects to messing with the button. |
15:10 |
Dyrcona |
berick: Well, I could add a button. I'd still like an example to look at how to manipulate the buttons from angluar. |
15:15 |
Dyrcona |
It looks like I could add strings to egStrings and alter the template to use a scope variable for the label, then change the scope variable based on options. |
15:16 |
Dyrcona |
I'll try that to see if it works. No harm in learning. |
15:17 |
berick |
Dyrcona: yeah, i think that'll do it |
15:24 |
Dyrcona |
A scope function probably works better. :) |
15:24 |
Dyrcona |
I've written it, now to try it. |
15:33 |
|
jvwoolf joined #evergreen |
15:39 |
Dyrcona |
Hm... It isn't working. It must load a new template. |
15:41 |
* Dyrcona |
tries clearing the template cache on the server first. |
15:41 |
|
abowling joined #evergreen |
15:47 |
Dyrcona |
Well, that didn't work. :( |
15:47 |
Dyrcona |
After clearing the browser cache and doing a hard reload, I'm getting the function name in the button label. |
15:48 |
berick |
<button>{{foo()}}</button> ? |
15:53 |
Dyrcona |
<eg-grid-menu-item handler="print_shelf_list" label="print_shelf_list_label"></eg-grid-menu-item> |
15:53 |
Dyrcona |
Where print_shelf_list_label is a $scope function. |
15:53 |
Dyrcona |
That returns a string. |
15:54 |
Dyrcona |
Seems that what works for disable, doesn't work for label. |
15:55 |
berick |
oh, grid buttons. |
15:55 |
Dyrcona |
Yeah, sorry. Guess I should have been more clear, but I didn't know it would make a difference. :) |
15:57 |
berick |
that label attribute is a string / read-only attributes. |
15:57 |
berick |
it only wants string literals |
15:57 |
|
abowling1 joined #evergreen |
15:57 |
Dyrcona |
Can I use {{}} in a template? |
15:58 |
|
yboston joined #evergreen |
15:59 |
Dyrcona |
Apparently, yes. |
15:59 |
Dyrcona |
Now, to see if the label actually changes. |
15:59 |
berick |
i'm not entirely sure what would happen if you did that, but I'm fairly certain if it worked, it would only work once.. |
15:59 |
berick |
cool |
16:00 |
berick |
as in, i'll be suprised if it changes |
16:00 |
Dyrcona |
Yeah. Only once. |
16:00 |
Dyrcona |
So, maybe I'll just change the label from Print Full List to Print List.... |
16:06 |
|
khuckins joined #evergreen |
16:23 |
Bmagic |
Has anyone answered the question "Bibs with non deleted items with 100% part coverage?" All of the versions of the query that I end up writing is very very slow and almost always needs to use "not in(select target_copy from asset.copy_part_map)" - I need to find bibs that have items and those items ALL have parts. |
16:24 |
pastebot |
"Bmagic" at 64.57.241.14 pasted "Query to find bibs with items that have parts and also have items without parts" (33 lines) at http://paste.evergreen-ils.org/1990 |
16:26 |
Bmagic |
This is a query that is "warm" but the opposite of what I need |
16:32 |
Bmagic |
lol, the rubber duck moment just occurred. The solution: |
16:32 |
pastebot |
"Bmagic" at 64.57.241.14 pasted "Title Level holds for bibs that only contain items with parts" (50 lines) at http://paste.evergreen-ils.org/1991 |
16:33 |
Bmagic |
Welp, that was fun |
16:33 |
Bmagic |
Thanks Rubber #evergreen Duck |
16:48 |
Dyrcona |
And, offline circ just worked for me in Chromium, so go figure.... |
16:49 |
Dyrcona |
When I tried to connect to our training server while it was in a state of limbo, I was sent right into the offline interface. |
16:49 |
kmlussier |
Dyrcona: That's a good thing, right? :) |
16:50 |
Dyrcona |
Yes, I guess that recent Chromium update fixed whatever was wrong. |
17:09 |
|
mmorgan left #evergreen |
17:20 |
|
jaswinder joined #evergreen |
18:14 |
|
jaswinder joined #evergreen |
18:18 |
|
kmlussier joined #evergreen |
18:18 |
kmlussier |
rhamby++ |
18:30 |
|
jaswinder joined #evergreen |
18:31 |
pinesol_green |
News from qatests: Testing Success <http://testing.evergreen-ils.org/~live> |
18:33 |
|
jaswinder joined #evergreen |
18:48 |
kmlussier |
@quote random |
18:48 |
pinesol_green |
kmlussier: Quote #132: "< Dyrcona> Ugh. Pg array literals with strings.... < jeff> ...these are a few of my favorite things?" (added by csharp at 10:18 AM, December 07, 2015) |
18:49 |
|
jvwoolf joined #evergreen |
19:01 |
|
beanjammin joined #evergreen |
19:33 |
pinesol_green |
[evergreen|Jane Sandberg] Docs: adding some basic info about getting data from opensearch - <http://git.evergreen-ils.org/?p=Evergreen.git;a=commit;h=19a1b40> |
19:33 |
pinesol_green |
[evergreen|Jane Sandberg] Merge branch 'master' of git.evergreen-ils.org:Evergreen - <http://git.evergreen-ils.org/?p=Evergreen.git;a=commit;h=fed1f31> |
19:53 |
|
jaswinder joined #evergreen |
21:56 |
|
jaswinder joined #evergreen |
23:15 |
|
jaswinder joined #evergreen |